From e1b53df502092ecbb66e4678c1d81dd9cbcc9404 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 19 May 2006 15:52:35 +0100 Subject: [PATCH] Fix xentrace_format to deal with more than 16 CPUs. Signed-off-by: KUWAMURA Shin'ya --- tools/xentrace/xentrace_format | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/xentrace/xentrace_format b/tools/xentrace/xentrace_format index 827680b95e..537785824a 100644 --- a/tools/xentrace/xentrace_format +++ b/tools/xentrace/xentrace_format @@ -89,7 +89,7 @@ defs = read_defs(arg[0]) CPUREC = "I" TRCREC = "QLLLLLL" -last_tsc = [0,0,0,0,0,0,0,0] +last_tsc = [0] i=0 @@ -111,7 +111,9 @@ while not interrupted: #print i, tsc - if tsc < last_tsc[cpu]: + if cpu >= len(last_tsc): + last_tsc += [0] * (cpu - len(last_tsc) + 1) + elif tsc < last_tsc[cpu]: print "TSC stepped backward cpu %d ! %d %d" % (cpu,tsc,last_tsc[cpu]) last_tsc[cpu] = tsc -- 2.30.2